package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author stone
 * @date 2022/07/11 16:22
 */
@Controller
@RequestMapping("param")
public class ParamLimitController {

    //localhost:8080/param/login?username=songge&password=niupi
    //限定请求参数，必须要携带username和password
    @RequestMapping(value = "login",params = {"username","password"})
    @ResponseBody
    public BaseRespVo login() {
        BaseRespVo baseRespVo = new BaseRespVo();
        baseRespVo.setData("Params属性");
        return baseRespVo;
    }
}
